<?php
session_start();
require_once('../include/connect.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="">
<table width="898" border="1">
  <tr>
    <td width="39" align="center">ลำดับ</td>
    <td width="110" align="center">รหัสชุดข้อสอบ</td>
    <td width="232" align="center">รายละเอียด</td>
    <td width="152" align="center">วันเริ่มทำข้อสอบ</td>
    <td width="148" align="center">วันข้อสอบหมดอายุ</td>
    <td width="101" align="center">เวลาทำข้อสอบ</td>
    <td width="70" align="center">ทำข้อสอบ</td>
  </tr>
 <?php
		$number==0;
		$query = query("SELECT * FROM tb_set_of_test order by set_id desc");
			while ($rs = fetch_array($query)) {
				$set_id = $rs['set_id'];
				$set_date_cre = $rs['set_date_cre'];
				$start_dates = $rs['start_dates'];
				$end_dates = $rs['end_dates'];
				$end_dates = $rs['end_dates'];
				$set_time_dotest = $rs['set_time_dotest'];
				$topic_id = $rs ['topic_id'];
				$number++;
		?>
  <tr>
    <td align="center"><? echo "$number"?></td>
    <td align="center"><a href="frm_make_set.php?set_id=<? echo "$set_id"?> "><? echo "$set_id"?></a></td>
    <td>ข้อสอบวิชา[<? echo "$subject_id";?>] หัวข้อ [<? echo "$topic_id";?>]</td>
    <td align="center"><? echo "$start_dates"?></td>
    <td align="center"><? echo "$end_dates"?></td>
    <td align="center"><? echo "$set_time_dotest"?>  นาที</td>
    <td align="center"><a href="frm_student_dotest.php?set_id=<? echo "$set_id"?> ">เริ่มทำ</a></td>
  </tr>
  <? }?>
</table>
</form>
</body>
</html>
